Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI for forward-porting GC3 patches to GC4 #147

Draft
wants to merge 11 commits into
base: gc4
Choose a base branch
from

Conversation

ddeclerck
Copy link
Contributor

Follow-up of #146.

@ddeclerck ddeclerck changed the title Dummy commit CI for forward-porting GC3 patches to GC4 May 29, 2024
@ddeclerck ddeclerck force-pushed the gc3_to_gc4 branch 3 times, most recently from 6900d8d to 1c95bd0 Compare May 30, 2024 21:21
@@ -96,12 +96,15 @@ autoreconf $AC_OPTS $MAINPATH > $msgs 2>&1; ret=$?
# Filter aminclude_static as those are only used _within_ another
# check so reporting as portability problem is only noise.
# This has the effect of redirecting some error messages to stdout.
# to be moved to the Makefile - currently only usable for bootstrap,
# but should be done on autogen, too
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A, that old TODO...

Copy link
Collaborator

@GitMensch GitMensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to wrap the commits again. From what I've inspected we need one refactor for integrating 4.x logic (you've spotted that well) nicely.

libcob/fileio.c Outdated
snprintf (file_open_env, (size_t)COB_FILE_MAX, "%s%s", "IO_", s);
if ((file_open_io_env = cob_get_env (file_open_env, NULL)) == NULL) {
snprintf (file_open_env, (size_t)COB_FILE_MAX, "%s%s", "io_", s);
if (f != NULL) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When/why should f be null here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because some functions (open_cbl_file, cob_sys_delete_file, ...) were "improved" to perform file mapping in GC3 (rev 3944), by calling the cob_chk_file_mapping function, which does not take a cob_file argument in GC3 but does in GC4, and that function in turn calls cob_chk_file_env. Since these functions (open_cbl_file, cob_sys_delete_file, ...) do not use a cob_file object, I resorted to passing NULL and coping with that...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this okay for you @GitMensch ?

libcob/fileio.c Outdated Show resolved Hide resolved
@GitMensch
Copy link
Collaborator

oops, hope I haven't broken the gitignore in f36dcda - if not then we likely should apply that to the gcos3x branch as well.

@ddeclerck
Copy link
Contributor Author

ddeclerck commented May 31, 2024

I suggest to wrap the commits again. From what I've inspected we need one refactor for integrating 4.x logic (you've spotted that well) nicely.

Saw your message a bit late, added another commit in the meantime 😅

By wrapping up you mean, committing to SVN ? (after doing the requested modifications of course)

@GitMensch
Copy link
Collaborator

GitMensch commented Jun 1, 2024 via email

@ddeclerck
Copy link
Contributor Author

I tend to be overly "conservative". Indeed this piece of code is barely modified afterwards, so I'll do the refactoring.

@ddeclerck
Copy link
Contributor Author

Is this okay to merge (@GitMensch) ?

@GitMensch
Copy link
Collaborator

I'll try to review this (late) evening.

@GitMensch
Copy link
Collaborator

looks_absolute should use "src", not file_open_name directly (merge issue?)

"apply_file_paths" should get that via argument as well and have a function comment that it writes to the global buffer. Then add a Changelog "extracted from xyz and also used in abc" to finish that last commit.

We either have to remember for later that we need to add a testcase for the new use or (potentially easier) also include it in the last commit as well.

@ddeclerck
Copy link
Contributor Author

looks_absolute should use "src", not file_open_name directly (merge issue?)

This change is introduced in a later commit (3993).

"apply_file_paths" should get that via argument as well and have a function comment that it writes to the global buffer. Then add a Changelog "extracted from xyz and also used in abc" to finish that last commit.

Alright ; as for its output, should it write it through its argument or directly to file_open_name ?

We either have to remember for later that we need to add a testcase for the new use or (potentially easier) also include it in the last commit as well.

By "new use", de you mean the fact that we apply file paths to the complex case ?

@GitMensch
Copy link
Collaborator

By "new use", de you mean the fact that we apply file paths to the complex case ?

yes

This change is introduced in a later commit (3993).

good catch - then it is fine to leave as is; if you don't expect any big problem it would be nice to merge that in this bunch to commit that together, but a later bunch is fine as well

Alright ; as for its output, should it write it through its argument or directly to file_open_name ?

Depends on how other functions do it - it is best for now to mimic that (once the merge is completed we may revisit that part, but there are "some" commits left until we get there).

@ddeclerck
Copy link
Contributor Author

I made the necessary changes.

This change is introduced in a later commit (3993).

good catch - then it is fine to leave as is; if you don't expect any big problem it would be nice to merge that in this bunch to commit that together, but a later bunch is fine as well

I find it more convenient to merge consecutive commits. If that's okay for you I could add to the current batch the next eligible commits until 3993 (that would be 6 commits: 3973, 3979, 3988, 3989, 3992 and 3993).

@GitMensch
Copy link
Collaborator

That batch is good to go :-)

@ddeclerck
Copy link
Contributor Author

That batch is good to go :-)

Merged in SVN ;)

I see the next commits deal with translation files. Checking the history, it seems those files are usually just copied "as-is" from the GC3 branch to the trunk; is this correct ?

@GitMensch
Copy link
Collaborator

I see the next commits deal with translation files. Checking the history, it seems those files are usually just copied "as-is" from the GC3 branch to the trunk; is this correct ?

No, only new files are copied, the others left as-is; before a release I regenerate the files but the files are nearly completely maintained by the translation project.
So just record the merge, then copy over new files and svn add them, if there are any.

And of course

@ddeclerck
Copy link
Contributor Author

ddeclerck commented Jun 8, 2024

Alright.

And of course

Hope this unfinished sentence did not have any vital info 😅

@GitMensch
Copy link
Collaborator

I can't remember any important info missing there.

@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 74.11765% with 22 lines in your changes missing coverage. Please review.

Please upload report for BASE (gc4@5e53aa0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
cobc/field.c 62.96% 7 Missing and 13 partials ⚠️
cobc/cobc.c 0.00% 0 Missing and 1 partial ⚠️
cobc/parser.y 95.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@          Coverage Diff           @@
##             gc4     #147   +/-   ##
======================================
  Coverage       ?   65.61%           
======================================
  Files          ?       38           
  Lines          ?    67728           
  Branches       ?    18932           
======================================
  Hits           ?    44438           
  Misses         ?    16111           
  Partials       ?     7179           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ddeclerck
Copy link
Contributor Author

Quick question: I sometimes see alternative code for GC4 in #if 0 blocks; I guess I should implement those and drop the other branch, correct ?

I'm talking about those:

#if 0 /* TODO for 4.0: set the attributes from the field given outside on the stack */
		output ("cob_field *cob_fret, const int cob_pam");
#else
		output ("cob_field **cob_fret, const int cob_pam");
#endif

@GitMensch
Copy link
Collaborator

That's quite a bunch - any reason to not merge upstream?
Open issues you are aware of or special adjustments needed?

[we really need to get to commits that have someone else in the ChangeLogs...]

@ddeclerck
Copy link
Contributor Author

ddeclerck commented Jun 12, 2024

That's quite a bunch - any reason to not merge upstream? Open issues you are aware of or special adjustments needed?

No good reason. It may be many commits, but the first batch had way more lines (this one is only +1,162 −904).
Anyways, I'll merge upstream if that's okay with you.

[we really need to get to commits that have someone else in the ChangeLogs...]

I'm looking forward to reaching commit 4614 - our first contribution to GC3 ;)

@ddeclerck
Copy link
Contributor Author

@GitMensch This looks large enough already, I'll think I'll end this batch here.

@ddeclerck ddeclerck requested a review from GitMensch January 16, 2025 23:19
Copy link
Collaborator

@GitMensch GitMensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current bunch looks quite fine. Some issues are in the area of "oh yeah, we fixed that later" - but nothing that's important enough to be early checked in.

If you don't see anything that needs to be detail-checked (any issues during merge?) then that's good to go upstream as-is.

@ddeclerck
Copy link
Contributor Author

The current bunch looks quite fine. Some issues are in the area of "oh yeah, we fixed that later" - but nothing that's important enough to be early checked in.

What would this issues be ?

If you don't see anything that needs to be detail-checked (any issues during merge?) then that's good to go upstream as-is.

Nothing that I can find of. Merging 5129 was just "slightly" more tricky due to some differences between 3.x and trunk (required more manual conflict resolution), but it didn't raise any issue, and the testsuite ran fine after this. There were some issues trying to merge 5131, but I stepped back and chosed to leave this one for the next batch - so this next batch might be a bit more tricky (and I'll tell you if I encounter any difficulty).

@GitMensch
Copy link
Collaborator

GitMensch commented Jan 18, 2025 via email

@ddeclerck ddeclerck force-pushed the gc3_to_gc4 branch 5 times, most recently from d77633c to ae1f11f Compare January 18, 2025 20:05
@ddeclerck
Copy link
Contributor Author

I think this concludes this batch. Don't be impressed by the line count: actually a single commit added 2600 lines to a testsuite file ; other than that, there's only 600 new lines of code.

@ddeclerck ddeclerck requested a review from GitMensch January 22, 2025 08:48
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that needed? We shouldn't have anything in here that requires updating the internal m4 files or libtool, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know why, but with the latest Ubuntu image, the CI stopped working - complaining about a libtool version mismatch. So I had to add the "install" parameter to the bootstrap script (see below) to regenerate the files, but then it complained it could not find autopoint - hence the extra package here.

Copy link
Contributor Author

@ddeclerck ddeclerck Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the current GC4 CI run.
Also not that the MacOS and MSYS2 CI do call bootstrap install.

Comment on lines +149 to +152
# Since the latest Ubuntu image, lcov fails complaining about negative branch counts,
# and using fprofile-update=atomic as suggested does not help, so use the previous image
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

complain = error? I think this should be fixed on the gcos-gc3 branch - and not with a downgrade

Copy link
Contributor Author

@ddeclerck ddeclerck Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, blocking error. See Issue 212. I haven't been able to fix that, so I went with a downgrade so that I could continue focusing on the merge.
Note that this is only for the coverage part of the workflow.

Copy link
Collaborator

@GitMensch GitMensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the workflow file (which cannot be part of this in any case), which we should fix in the gcos 3.x branch in any case, this bunch is good to go; nice to have the testcases in

note: I'm not sure when this all broke, but the increasing test failures of 4.x under Win32 are kind of concerning:

  • MSVC - delay load stuff for BDB does not work any more - I'm sure it did before
  • MSYS1 - a bunch of new failures
  • general (minor): Win32 adjustments for the testsuite / code to reduce false-positives seems to not be merged yet; maybe we can get those commits in early, maybe not

It could be good to take some time "soon" to work at least on some of the new failures (especially the delay-load stuff for ISAM, that's 4.x in any case).
In general it would be good to update the gcos4 branch to the newest CI definitions (they look different now) and adjust the expected test case failures (likely more for now).

@ddeclerck
Copy link
Contributor Author

ddeclerck commented Jan 24, 2025

note: I'm not sure when this all broke, but the increasing test failures of 4.x under Win32 are kind of concerning:

I keep track of those numbers, they do not seem to have increased significantly (even reduced under MSVC).
For MSVC (release), there were 141 failures when I started the merge, 75 after merging 4689, 60 after 5050, and 59 now, all this while the number of tests increased by 161. In debug mode, the number of failed tests is higher (133) due to the runtime checker reporting possible data loss because of casts to smaller data types.
For MSYS1, there are indeed a few more failures (8 between commits 4999 and this last batch, for a total of 53), but the number of tests also increased by 112.

  • MSVC - delay load stuff for BDB does not work any more - I'm sure it did before

As far as I remember, it did not. When I started the merge, I wrote down some of the most recurring error messages in the testsuite logs, and in particular I had many occurrences of "error: I/O routine BDB cannot be loaded: module libcobdb-1.dll not found"

  • general (minor): Win32 adjustments for the testsuite / code to reduce false-positives seems to not be merged yet; maybe we can get those commits in early, maybe not

Those commits (5308, 5315-5318) were merged a while ago.
I could do a new pass on the MSVC Debug to silence the lossy casts - since those don't happen in 3.x I guess they occur in 4.x-specific code.

In general it would be good to update the gcos4 branch to the newest CI definitions (they look different now)

I think you made #190 for this ; is this okay to be merged (after a rebase) ?
EDIT: note that I'm not confident about touching the CI, each time I do that, it always takes me forever to get it to work correctly, and the current one seems sufficient for its purpose (i.e. checking for the merge)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants